#pragma once
#include "Utils.hpp"
#include <math.h>

namespace MonsterFactory {

  class Player {
  private:
    Player();
    ~Player(){}    
    Player(const Player&) {};
    Player& operator=(const Player&) {}

    static Player* instance;

    class Garbo
    {
    public:
      ~Garbo()
      {
	if(Player::instance != NULL  )
	  {
	    delete Player::instance;
	    Player::instance = NULL;
	  }
      }
    };
    static Garbo garbo;
    unsigned int level;
    int lives;
    bool isDead;

  public:
    static Player* GetInstance() {
      if (instance == NULL)
	instance = new Player();
      return instance;
    }

    unsigned int GetLevel() {return level;}
    int GetLives() {return lives;}    
    bool IsDead() {return isDead;}
    void SetAsDead(bool status) {isDead = status;}
    void LevelUp() {++level;}
    void UpdateLives(int input) {lives += input;}

    void PrintPlayer();

  }; // player
}
